Skip to content

fix: handle Windows path stripping failures gracefully#93

Merged
branchseer merged 2 commits intomainfrom
fix/windows-relative-path-handling
Jan 13, 2026
Merged

fix: handle Windows path stripping failures gracefully#93
branchseer merged 2 commits intomainfrom
fix/windows-relative-path-handling

Conversation

@branchseer
Copy link
Copy Markdown
Member

Summary

  • Fix Windows path handling that caused "Invalid relative path" errors
  • On Windows, path stripping may fail due to case sensitivity or path format differences
  • Instead of failing with an error, treat such paths as outside the workspace (like other unmatched paths)

Problem

When running vite-task on Windows, paths tracked by fspy might have different formats or casing than the workspace root. This caused errors like:

Invalid relative path 'D:\a\vite-plus\vite-plus\ecosystem-ci\tanstack-start-helloworld': path is not relative

Solution

Changed the error handling to use .ok() instead of .map_err() followed by .transpose()?, treating conversion failures as paths outside the workspace.

Test plan

  • Ran cargo test -p vite_task locally
  • Testing in vite-plus E2E CI

🤖 Generated with Claude Code

On Windows, path stripping may fail due to case sensitivity or path
format differences between the tracked access path and workspace root.
Previously this caused an error like:
"Invalid relative path 'D:\a\...\project': path is not relative"

This change treats such paths as outside the workspace (returning None)
rather than failing, which is consistent with how we handle paths that
don't match the workspace prefix.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@branchseer branchseer merged commit 3c85add into main Jan 13, 2026
5 checks passed
@branchseer branchseer deleted the fix/windows-relative-path-handling branch January 13, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants